home *** CD-ROM | disk | FTP | other *** search
- Path: lard.ftp.com!news-control
- From: nkamat@ftp.com (Ozmaniac)
- Newsgroups: comp.lang.c
- Subject: Re: Initialising structure members - help please!
- Date: 20 Feb 1996 22:13:42 GMT
- Organization: FTP Software
- Message-ID: <4gdh2m$sll@lard.ftp.com>
- References: <4gb8hn$3m8@news.mistral.co.uk>
- NNTP-Posting-Host: nkamat-2.ftp.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.11
-
- Try the inline suggestions:
- In article <4gb8hn$3m8@news.mistral.co.uk>, mikebarnard@mistral.co.uk says...
-
- >struct menuitem
- > {
- > int number; // Item 1, item 2 etc.
- > char description[70]; // Room for a text description
- > struct menuitem *next; // Pointer to next menu item
- > struct menuitem *last; // Pointer to last menu item
- > };
- >one.description = "1. Calculate a minefield";
- strcpy(one.description, "1. Calc a minefield"); //be sure to include string.h
-
- >one.next = two;
- one.next = &two;
-
- >one.last = five;
- one.last = &five;
-
- >Mic.
- >From windy Worthing; England.
- >mikebarnard@mistral.co.uk
- >
-
-
-